1. Field of the Invention
The present invention relates to a function approximation arithmetic unit, which calculates function approximations using a look-up table (LUT).
2. Description of the Related Art
A calculation method using an arithmetic unit, which calculates function approximations using a conventional LUT, is described below. To begin with, an LUT is provided in advance. An operand is divided into a high-order bit string and a low-order bit string. An operand domain of a function is divided into multiple segments, which are associated with the high-order bit string. The function is approximated by a straight line having a reference value within a segment as an initial value. A LUT that outputs an initial value and the inclination value of a straight line in response to entry of the high-order bit string is prepared.
When an operand is input to an arithmetic unit, an initial value and the inclination value corresponding to a segment to which the input operand belongs are output from the LUT, and a straight line to approximate that segment to which the input operand belongs is determined. A function approximation is calculated by using that straight line and that operand.
An error between the function and the straight line tends to increase at the center and both ends of a segment. To reduce the error, the segment should be further subdivided. However, subdivision increases the number of segments, resulting in an increase in the number of bits of the high-order bit string. This increases the LUT size exponentially, resulting in an exponential increase in the circuit size of an arithmetic unit.